Digital data is often obtained with a plurality of event channels including audio tracks and photography. In the context of photography, which is not intended to be limiting, the event channels are the primary colors of red, green, and blue (R, G and B) present for each dot of a population of data or dots in the image. Due to a variety of real-world characteristics, an image may not necessarily duplicate that which was seen by the eye, or one may wish to otherwise alter the image which was captured. An image may be scanned from film photography or be captured digitally form the outset.
In the case of conventional film photography, a photograph image taken with standard daylight film in daylight will typically result in a pleasing picture as daylight spectrum is skewed to the blue end of the visible light spectrum. However, use of daylight film in a room illuminated by a standard tungsten filament incandescent light source will characteristically result in a yellowish tint because a tungsten filament has a spectrum skewed to the yellow portion of the visible light spectrum. Some prior art techniques in film photography is to use a particular film which attempts to correct for such lighting conditions. In the case of direct digital photography, the correction must be applied using a filter (which will affect the entire of the image) or based on image correction techniques.
There are current technologies that use histograms as an approach to tint correction. Many standard image enhancement computer programs offer this approach as an option.
A color photograph is best thought of as a composite of three “primary color” images. These three primary color images are superimposed on each other to give the color photograph. The three primary colors are red, green and blue. FIG. 1 is a color photograph of a young lady reading on a couch. FIG. 2 is the red component of that photograph. FIGS. 3 and 4 are the green and blue components of FIG. 1, respectively.
A standard histogram analysis yields three normal histograms of FIG. 1. FIG. 5 is the histogram of the red component. FIGS. 6 and 7 are the histograms of the green and blue component, respectively.
The standard approach is to “stretch the histograms” in the following manner. A single “tolerable” rate for the clipping of all 3 channels (red, green, blue) is set. Often this is a number near 1%. A running total of the histogram is calculated starting from 0 on the x axis. The point at which the lower tolerance (−1%) occurs and the upper tolerance (−99%) occurs is taken to represent the “good data” and the histograms are stretched so that these points become the new 0 and 255 values.
The mathematical linear transformations:redout=slopered*redin+interceptred greenout=slopegreen*greenin+interceptgreeen blueout=slopeblue*bluein+interceptblue are calculated and the histograms are then “stretched” in this way. See FIGS. 8, 9 and 10 for histogram stretching for the red, green and blue channels, respectively.
Once the linear transforms are known, the image can also be stretched in the same way, that is to say, using the identical mathematical equations. See FIG. 11 for the modified photograph.
It is difficult to see from in a Black and White rendering of FIG. 11, however while the corrected photograph has a pleasing overall tone to it, the young woman's skin tone is now unacceptably blue. What went wrong?
The approach of adjusting the three channels independently and using a common “acceptable” rejection percentage at both the top and bottom edges of the histograms—assumes that there is a similarity with the basic statistical measures of the three histograms. This is undoubtedly often the case but it is not necessarily valid.
FIG. 12 is an amplified version of FIG. 4. It can be seen that there are a small, but non-zero, number of occurrences of large values for blue. These are important as ignoring them calculates too much blue amplification. Simply put there are times when these weak occurrence “tails” are important preserve and other times when they are important to disregard.
What is required is a technique which is sensitive to variations between the event channels of data populations.